<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<title>美站库 炫美网站大全</title>
<link rel="stylesheet" type="text/css" href="images/index.css" />

<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">
</script>

<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">

  <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
  
</head>
<body style="">
<div id="header">
     <div id="top" class="auto">
	     <div class="logo">
	         <h1>
		         <img src="images/logo.png" />
			     <span>炫美网站大全</span>
			 </h1>
		 </div>
		 <div class="serach">
		     <form action="search.html" target="_blank">
			    <input id="searchText" class="text ui-autocomplete-input" type="text" autocomplete="off" />
				<input id="searchButton" class="submit" type="button" value="搜索" />
			 </form>
		 </div>
	 </div>
	 <div id="nav" class="auto">
	    <ul>
		    <li><a href="http://192.168.2.52/#">首页</a></li>
			<li><a href="http://192.168.2.52/#">提交站点</a></li>
		</ul>
	 </div>    
	 <div id="runplay" class="auto">
	    <div class="left">
		    <a href="http://192.168.2.52/#"><img src="images/img1.jpg" /></a>
		</div>
		<div class="right">
		<dl>
		    <dt id="runplayH">电影库</dt>
			<dd class="txt" id="rate">最强搜索</dd>
			<dd class="btn">
			    <a href="http://192.168.2.52/#">查看更多</a>
			</dd>
		</dl>
		</div>
	 </div>
</div>
<div id="main">
    <div id="mainl">
        <div id="wrap">
		    <div id="leftBody">
			    <div class="leftDiv1">
			        <h2>电影库</h2>
				    <p id="rsCount">电影库是<a href="http://www.sifangku.com" target="_blank">私房库</a>中的第一个电影观赏课!</p>
			    </div>
			<div class="leftDiv2">
			<h2>宇宙最强搜索</h2>
			    <ul>
				    <li>
					    <a href="https://movie.douban.com/subject/27063403/"><img src="https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2526385810.webp" height="143px"/></a>
						<p>悠哉日常大王剧场版：假期活动</p>
					</li>
					<li>
					    <a href="https://movie.douban.com/subject/26374197/"><img src="https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2542867516.webp" height="143px"/></a>
						<p>蜘蛛侠：平行宇宙</p>
					</li>
					<li>
					     <a href="https://movie.douban.com/subject/20438964/"><img src="https://img3.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2537667301.webp" height="143px"/></a>
						<p>无敌破坏王2：大闹互联网</p>
					</li>
					<li>
					     <a href="https://movie.douban.com/subject/26147417/"><img src="https://img1.doubanio.com\/view\/photo\/s_ratio_poster\/public\/p2538826177.webp" height="143px"/></a>
						<p>神奇动物：格林德沃之罪</p>
					</li>
				</ul>
			</div>
			<div class="leftDiv3">
					<a href="https://movie.douban.com/">查看更多</a>
			    </div>
			</div>
			<div id="rightBody">
			    <div class="rightDiv1">
				<h2>酷文</h2>
				<ul>
				    <li>
					 <h3><a href="http://192.168.2.52/#" target="_blank">宇宙无敌小仙女</a></h3>
					<p>森</p>
					</li>
					<li>
					 <h3><a href="http://192.168.2.52/#" target="_blank">宇宙无敌小仙女</a></h3>
					<p>淼</p>
					</li>
					<li>
					 <h3><a href="http://192.168.2.52/#" target="_blank">宇宙无敌小仙女</a></h3>
					<p>淼</p>
					</li>
				</ul>
				</div>
				 <div class="rightDiv2">
				    <dl class="dl1">
					    <dt><a href="http://192.168.2.52/#">随便爱我</a></dt>
						<dd>呱呱呱</dd>
					</dl>
					 <dl class="dl2">
					    <dt><a href="http://192.168.2.52/#">随便爱我</a></dt>
						<dd>嘎嘎嘎</dd>
					</dl>
				</div>
			</div>
		</div>
    </div>
</div>
<div id="footer">
    <p class="p1">
	    <a href="http://192.168.2.52/#" target="_blank">首页</a>
	    <a href="http://192.168.2.52/#" target="_blank">美站</a>
	    <a href="http://192.168.2.52/#" target="_blank">酷文</a>
	    <a class="last" href="http://192.168.2.52/#" target="_blank">联系我們</a>
	</p>
	<p>
	    Copyright (C) 2014 | <a href="http://www.sifangku.com" target="_blank">私房库</a>
	</p>
</div>

<script>
$(document).ready(function(){

   var ajaxData = [];
   var titles=[];
   
   
	$.ajax({url:"data/douban300.json",
		
		success:function(result){
			ajaxData=result;
			  $("#rsCount").html("ajax访问成功");
			//alert(result.subjects[2].title);
			
			//alert(result.subjects.length);
			var i=0;
		   	for (i=0;i<ajaxData.subjects.length;i++)
			 {
			  titles.push(ajaxData.subjects[i].title);		 
			 }
		
		}});

		
    $( "#searchText" ).autocomplete({
      source: titles
    });

	$("#searchButton").click(function(){
	   var usrIp=$("#searchText").val();
	   $("#runplayH").html("您刚输入："+usrIp);	   
	   alert(usrIp);
	   
	   
	 //反查用户选择的电影名称，查评分rate, 查影片封面cover  
	 
	    var rate;
		var cover;
	   	for (i=0;i<ajaxData.subjects.length;i++)
			 {
			 
			   var currentTitle= ajaxData.subjects[i].title;
                   if(currentTitle==usrIp)
				     {
					   rate=ajaxData.subjects[i].rate;
					   cover=ajaxData.subjects[i].cover;
					    $("#rate").html("电影评分为："+rate);
              			$("#titleOne").html(ajaxData.subjects[i].title+" 电影评分为："+rate);			
					    $("#imgOne").attr('src', cover);	 
					    
					   return;
					 }
			 
			 }
	   
	   
	   		
		
	});
});
</script>

<ul class="ui-autocomplete ui-front ui-menu ui-widget ui-widget-content" id="ui-id-1" tabindex="0" style="display: none;"></ul><span role="status" aria-live="assertive" aria-relevant="additions" class="ui-helper-hidden-accessible"></span>
	
</body>
</html>